1. Field of the Invention
The present invention relates in general to an audio encoding method, and more particularly, to an audio encoding method with function of accelerating a quantization iterative loop process.
2. Description of the Prior Art
At present, many coding apparatuses are based on different coding algorithms, such as MP3 (MPEG audio layer III), AAC (Advanced Audio Coding), and Dolby Digital™. These coding algorithms take into account the characteristics of the human auditory system, and have the advantage of high compression ratio (generally more than ten times). These coding apparatuses adopt perceptual coding, frequency domain coding, window switching, dynamic bit allocation technologies, etc to eliminate unnecessary content of the original audio data.
Please refer to FIG. 1, which is a flowchart depicting a prior art audio encoding method. The prior art audio encoding method comprises the following steps:
Step S100: furnish an input frame having pulse code modulation;
Step S110: convert the input frame from time-domain to frequency-domain to generate a plurality of frequency samples corresponding to the input frame;
Step S130: analyze an amount of available bits for calculating a number of available bits;
Step S140: reset iterative variables corresponding to an outer quantization iterative loop encoding process;
Step S150: detect whether all the sample energies corresponding to the plurality of frequency samples are equal to zero, if all the sample energies corresponding to the plurality of frequency samples are equal to zero, then go to step S170, else go to step S160;
Step S160: perform the outer quantization iterative loop encoding process to generate a coded frame;
Step S170: analyze an amount of unused bits for calculating a number of unused bits, which is provided as the information of available bits for subsequent signal processing; and
Step S180: finished.
In the aforementioned prior art audio encoding method, the initial values of the iterative variables, such as scalefactors and global gain, for performing the outer quantization iterative loop encoding process are all set to zero. Accordingly, significant differences between the initial values and expectation values concerning the iterative variables are likely to occur, and heavy calculation is required for performing the outer quantization iterative loop encoding process to achieve the expectation values. It is therefore not efficient to adopt the prior art audio encoding method for encoding input frames.